@import 'variable';
@mixin select($top, $left) {
    ul {
        position: absolute;
        width: auto;
        background: #FFF;
        border-radius: 3px;
        box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
        top: $top;
        left: $left;
        line-height: 25px;
        padding: 2px 0;
        z-index: 3;
        max-height: 150px;
        overflow: auto;
        li {
            padding: 2px 16px;
            white-space: nowrap;
            cursor: pointer;
            &:hover {
                color: $highLight;
                background: $highLightBg;
            }
        }
    }
}

@mixin scm-input($width) {
    height: 24px;
    width: $width;
    padding-left: 5px; // padding-right: 22px;
    padding-right: 5px;
    border: 1px solid #e5e5e5;
    position: relative;
    display: inline-block;
    font-size: 12px;
    line-height: 1.5;
    color: #666;
    background-color: #fff;
    background-image: none;
    border-radius: 3px;
    -webkit-transition: $transition;
    &.scm-input-read {
        background: #f7f7f7;
        cursor: default;
    }
    &:hover {
        border: 1px solid $highLight;
    }
}

@mixin scm-btn {
    cursor: pointer;
    height: 30px;
    border-radius: 3px;
    border: 1px solid $lineColor;
    background: #FFF;
    padding: 0 12px;
    display: inline-block;
    white-space: nowrap;
    vertical-align: middle;
    i {
        margin-right: 5px;
    }
    &.blue {
        background: #108ee9;
        color: #FFF;
        border-color: #108ee9;
        padding: 0 15px;
        &:hover {
            background: #49a9ee;
            border-color: #49a9ee;
            color: #FFF;
            -webkit-transition: $transition;
        }
    }
    &.red {
        background: $redcolor1;
        color: #FFF;
        border-color: $redcolor1;
        &:hover {
            background: #fb4947;
            color: #FFF;
            border-color: #fb4947;
            opacity: .8;
        }
    }
    &:hover {
        border-color: #108ee9;
        color: #108ee9;
        -webkit-transition: $transition;
    }
}

@mixin arrowToggle ($right, $top:7px, $ontop:6px) {
    &:after {
        font-family: anticon !important;
        font-style: normal;
        vertical-align: baseline;
        text-transform: none;
        text-rendering: auto;
        position: absolute;
        content: "\E61D";
        right: $right; // margin-top: $marginTop;
        top: $top;
        font-size: 12px;
        -webkit-transform: scale(0.8);
        -webkit-transition: $transition;
    }
    &:hover {
        .scm-input {
            border-color: $highLight;
        }
    }
    &.on {
        &:after {
            -webkit-transform: rotate(-180deg) scale(0.8);
            top: $ontop;
        }
    }
}

// 清除浮动
@mixin clear {
    &:after {
        content: "";
        display: block;
        height: 0;
        clear: both;
    }
}

.clear {
    @include clear;
}

input {
    @include scm-input(100%)
}

button {
    @include scm-btn;
}

.red {
    color: $redcolor1;
}

.red1 {
    color: $redcolor2;
}

.blue {
    color: $highLight;
}

.green {
    color: $greencolor;
}

.brown {
    color: $browncolor;
}

.gray {
    color: #999;
}

.must {
    color: $redcolor;
}

.bold {
    font-weight: bold;
}

.minauto {
    min-width: inherit !important;
}
.height-auto{
    height: auto!important;
}

.fl {
    float: left;
}

.fr {
    float: right;
}

// 下拉菜单
.selectshow {
    display: inline-block;
    cursor: pointer;
    position: relative;
    @include arrowToggle(-15px);
    &:hover {
        color: $highLight;
    }
}

// 省略号
.ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hand {
    cursor: pointer;
}

a {
    color: #666;
}

a:hover {
    text-decoration: none;
    color: $highLight;
}

.icon-qq {
    width: 18px;
    height: 20px;
    margin: 0 5px -8px;
    display: inline-block;
    background: url(../images/qq.png) no-repeat; // vertical-align: -5px;
}

// 搜索更多弹窗自定义样式
.skin-searchMore {
    .form-list {
        min-width: inherit;
    }
    .operation {
        margin: 0 10px;
    }
    border-radius: 4px !important;
    .layui-layer-close:hover {
        background: url(../images/layerclose.png) no-repeat 0 1px;
        opacity: 1 !important;
    }
    .layui-layer-title {
        border-radius: 4px 4px 0 0;
        border-color: #e9e9e9;
        background: #fff;
        color: #333;
        font-weight: 700;
    }
    .layui-layer-content {
        // overflow: visible!important;
    }
    .layui-layer-btn {
        text-align: right;
        padding: 7px 4px 7px 10px !important;
        border-top: 1px solid #e9e9e9;
        a {
            padding: 0 18px;
            height: 32px;
            line-height: 32px;
            border-radius: 4px;
        }
        .layui-layer-btn1,
        .layui-layer-btn2,
        .layui-layer-btn3 {
            background: transparent;
            &:hover {
                border-color: #108ee9;
                color: #108ee9;
                transition: all 0.3s ease-out;
            }
        }
        .layui-layer-btn0 {
            background: $highLight;
            border-color: $highLight;
        }
    }
    .button-total {
        position: fixed;
        bottom: 0;
        left: 10px;
        >div {
            float: left;
            line-height: 47px;
            margin-right: 20px;
            span {
                color: $redcolor2;
            }
        }
    }
    .box-table {
        margin-bottom: 10px;
    }
}

.skin-overflow .layui-layer-content {
    overflow: visible !important;
}

// 单选复选
.mycheckbox,
.mycheckbox-read,
.mycheckbox-readCheck {
    em {
        display: inline-block;
        cursor: pointer;
        position: relative;
        margin-bottom: 0;
        width: 14px;
        height: 14px;
        top: 0;
        left: 0;
        background: #fff;
        border: 1px solid #ccc;
        -moz-border-radius: 3px;
        -webkit-border-radius: 3px;
        border-radius: 3px;
        vertical-align: middle;
        margin-right: 5px;
        margin-top: -3px;
        &:hover {
            border-color: #108ee9;
        }
    }
}

.mycheckbox-read {
    em {
        background: #eaeaea;
    }
}

.mycheckbox.active,
.mycheckbox-readCheck {
    em {
        background: #108ee9;
        border-color: #108ee9;
        &:after {
            content: '';
            position: absolute;
            width: 9px;
            height: 5px;
            background: transparent;
            top: 3px;
            left: 1px;
            border: 2px solid #fff;
            border-top: none;
            border-right: none;
            -webkit-transform: rotate(-45deg);
            -moz-transform: rotate(-45deg);
            -o-transform: rotate(-45deg);
            -ms-transform: rotate(-45deg);
            transform: rotate(-45deg);
        }
    }
}

.mycheckradio,
.mycheckradio-read,
.mycheckradio-readCheck {
    em {
        display: inline-block;
        cursor: pointer;
        position: relative;
        margin-bottom: 0;
        width: 12px;
        height: 12px;
        top: 0;
        left: 0;
        background: #fff;
        border: 1px solid #ccc;
        -moz-border-radius: 3px;
        -webkit-border-radius: 3px;
        border-radius: 50%;
        vertical-align: middle;
        margin-right: 5px;
        margin-top: -3px;
        &:hover {
            border-color: #108ee9;
        }
    }
}

.mycheckradio-read {
    em {
        background: #eaeaea;
    }
}

.mycheckradio.active,
.mycheckradio-readCheck {
    em {
        background: #108ee9;
        border-color: #108ee9;
        &:after {
            content: '';
            position: absolute;
            width: 4px;
            height: 4px;
            background: #fff;
            top: 3px;
            left: 3px;
            border-radius: 50%;
        }
    }
}

// 上传
.selectexcle {
    margin-top: -3px;
    position: relative;
    background: #fff;
    .icon-closecircle {
        display: none !important;
    }
    span {
        display: inline-block;
        height: 30px;
        line-height: 28px;
        padding: 0 5px;
        width: calc(100% - 56px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-style: solid;
        border-color: #e4e4e4;
        border-width: 1px 0 1px 1px;
        border-radius: 3px 0 0 3px;
        float: left;
    }
    button {
        float: left;
        border-radius: 0px 3px 3px 0;
    }
    input[type=file] {
        position: absolute;
        top: 0;
        left: 0; // z-index: -1;
        opacity: 0;
        height: 30px;
    }
}